<!--
 * @Author: Anjg
 * @Date: 2025-07-19 23:12:43
 * @LastEditTime: 2025-07-20 01:01:33
 * @Description:导航栏展示
-->
<template>
  <van-nav-bar
    :title="title"
    :left-text="leftText"
    :left-arrow="leftArrow"
    @click-left="onClickLeft"
    @click-right="onClickRight"
    :fixed="fixed"
  >

    <template #right>
      {{ rightText }}
      <slot name="right"></slot>
    </template>
  </van-nav-bar>
</template>

<script>
export default {
    name: 'anNavBar',
    props: {
        title: {
            type: String,
            default: ''
        },
        leftText: {
            type: String,
            default: ''
        },
        rightText: {
            type: String,
            default: ''
        },
        leftArrow: {
            type: Boolean,
            default: true
        },
        fixed: {
            type: Boolean,
            default: true
        }
    },
    methods: {
        onClickLeft() {
            this.$emit('onClickLeft');
        },
        onClickRight() {
            this.$emit('onClickRight');
        }
    }
};
</script>

<style>
</style>